﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLKhachSan.DTO;
using System.Data;
using System.Data.SqlClient;

namespace QLKhachSan.DAO
{
    public class DAO_LoaiDichVu
    {
        public static void themLoaiDichVu(DTO_LoaiDichVu p)
        {
            string[] name = new string[1] { "@TenLoaiDV" };
            object[] ob = new object[1] { p.TenLoaiDV };
            clsKetNoi.ThucThiLenhCoTS("pr_ThemLoaiDV", name, ob, 1);
        }
        public static DataTable hienthiDanhSachLoaiDichVu()
        {
            return clsKetNoi.Load("pr_HienThiLoaiDV");
        }

        public static void xoaLoaiDichVu(DTO_LoaiDichVu p)
        {
            string[] name = new string[1] { "@MaLoaiDV" };
            object[] ob = new object[1] { p.MaLoaiDV };
            clsKetNoi.ThucThiLenhCoTS("pr_XoaLoaiDV", name, ob, 1);
        }
        public static void suaLoaiDichVu(DTO_LoaiDichVu p)
        {
            string[] name = new string[2] { "@MaLoaiDichVu", "@TenLoaiDichVu" };
            object[] ob = new object[2] { p.MaLoaiDV, p.TenLoaiDV };
            clsKetNoi.ThucThiLenhCoTS("pr_SuaLoaiDichVu", name, ob, 2);
        }
    }
}
